<template>
  <div class="box">
    <van-nav-bar title="橙PLUS卡" left-arrow @click-left="onClickLeft">
      <template #right>
        <van-icon name="ellipsis" @click="showMark" />
      </template>
    </van-nav-bar>
    <van-overlay :show="show">
      <div class="wrapper" @click="closeMark">
        <div class="block">
          <div @click="goHome">
            <van-icon name="wap-home-o" class="block_icon" />
            <span>主页</span>
          </div>
          <div @click="goUser">
            <van-icon name="contact" class="block_icon" />
            <span>我的聚橙</span>
          </div>
        </div>
      </div>
    </van-overlay>
    <div class="vip_a">
      <div class="vip_a_box">
        <div class="vip_a_box_text">
          <p class="vip_a_box_text_1">使用规则</p>
          <span class="vip_a_box_text_2">橙PLUS卡</span>
          <div class="vip_a_box_text_3">
            <p>
              开卡999&nbsp;送&nbsp;<b>100</b>
              <span>储值卡</span>
            </p>
          </div>
          <div class="vip_a_box_text_4">
            <span>赠送VIP+会员</span>
            <span>尊享十大权益</span>
          </div>
        </div>
      </div>
    </div>
    <div class="vip_b">
      <button>立即打卡</button>
    </div>
    <div class="vip_c">
      <div class="vip_c_bj">
        <div class="vip_c_bj_box">
          <h4>VIP+尊享10大权益</h4>
          <div class="vip_c_bj_box_pic">
            <div class="bj_1">
              <div class="bj_1_box">
                <div class="bj_1_box_img"></div>
                <p>优先购票</p>
              </div>
              <div class="bj_1_box">
                <div class="bj_1_box_img"></div>
                <p>专属票价</p>
              </div>
              <div class="bj_1_box">
                <div class="bj_1_box_img"></div>
                <p>专享折扣</p>
              </div>
              <div class="bj_1_box">
                <div class="bj_1_box_img"></div>
                <p>专享券</p>
              </div>
            </div>
            <div class="bj_2">
              <div class="bj_2_box">
                <div class="bj_2_box_img"></div>
                <p>全场包邮</p>
              </div>
              <div class="bj_2_box">
                <div class="bj_2_box_img"></div>
                <p>双倍积分</p>
              </div>
              <div class="bj_2_box">
                <div class="bj_2_box_img"></div>
                <p>赠观影券</p>
              </div>
              <div class="bj_2_box">
                <div class="bj_2_box_img"></div>
                <p>明星活动</p>
              </div>
            </div>
            <div class="bj_3">
              <div class="bj_3_box">
                <div class="bj_3_box_img"></div>
                <p>免费期刊</p>
              </div>
              <div class="bj_3_box">
                <div class="bj_3_box_img"></div>
                <p>生日专享</p>
              </div>
              <div class="bj_3_box">
                <div class="bj_3_box_img"></div>
                <p>敬请期待</p>
              </div>
              <div class="bj_3_box"></div>
            </div>
          </div>
          <div class="vip_c_bj_box_button">
            <button>立即开通 ￥99/年</button>
          </div>
        </div>
      </div>
    </div>
    <div class="vip_d">
      <img src="https://m.juooo.com/static/img/save.e6e7f69.png" alt="">
    </div>
    <div class="vip_footer">
      <span>开卡限时送<b>￥100</b></span>
      <span>立即打卡</span>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import { Icon, NavBar, Overlay } from 'vant'
Vue.use(NavBar)
Vue.use(Icon)
Vue.use(Overlay)
export default {
  data () {
    return {
      show: false
    }
  },
  mounted () {},
  methods: {
    onClickLeft () {
      this.$router.go(-1)
    },
    showMark () {
      this.show = true
    },
    closeMark () {
      this.show = false
    },
    goHome () {
      this.$router.push('/home')
    },
    goUser () {
      if (localStorage.getItem('loginState') !== 'ok') {
        this.$router.push('/login')
      } else {
        this.$router.push('/user')
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.wrapper {
  display: flex;
  position: relative;
  height: 100%;
}
.block {
  width: 1.4rem;
  height: 0.9rem;
  position: absolute;
  top: 0.4rem;
  right: 0.05rem;
  border-radius: 0.05rem;
  background-color: #fff;
  div {
    width: 100%;
    height: 0.44rem;
    line-height: 0.44rem;
    .block_icon {
      font-size: 0.2rem;
      margin: 0 0.13rem;
      float: left;
      margin-top: 0.1rem;
    }
    span {
      float: left;
    }
  }
  div:nth-of-type(1) {
    border-bottom: 1px solid #f2f2f2;
  }
}
.vip_a {
  width: 100%;
  height: 2.25rem;
  box-sizing: border-box;
  padding: 0.15rem 0.15rem 0 0.15rem;
  background: #f5f5f5;
  .vip_a_box {
    width: 100%;
    height: 100%;
    background: linear-gradient(-4deg, rgb(30, 30, 30), rgb(49, 48, 47));
    padding: 0.12rem 0.13rem;
    box-sizing: border-box;
    .vip_a_box_text {
      width: 100%;
      height: 100%;
      border: 1px solid #f0e0ae;
      text-align: center;
      .vip_a_box_text_1 {
        height: 0.16rem;
        width: 100%;
        text-align: right;
        margin: 0.05rem 0;
        padding-right: 0.1rem;
        color: #f0e0ae;
        text-decoration: underline;
        font-size: 0.12rem;
        display: block;
      }
      .vip_a_box_text_2 {
        height: 0.4rem;
        line-height: 0.4rem;
        padding: 0 0.08rem;
        font-size: 0.18rem;
        text-align: center;
        display: inline-block;
        background: linear-gradient(0deg, rgb(245, 222, 169), rgb(248, 213, 131));
        color: #454341;
        font-weight: bold;
        margin-top: 0.04rem;
      }
      .vip_a_box_text_3 {
        width: 100%;
        height: 0.55rem;
        box-sizing: border-box;
        padding: 0 0.55rem;
        p {
          display: block;
          width: 100%;
          height: 0.55rem;
          line-height: 0.26rem;
          padding: 0.15rem 0 0.12rem 0;
          border-bottom: 1px solid rgba(240,224,174,0.5);
          color: #f0e0ae;
          font-size: 0.14rem;
          b {
            font-size: 0.2rem;
            /* font-weight: normal; */
          }
          span {
            padding: 0 0.03rem;
            height: 0.2rem;
            line-height: 0.2rem;
            text-align: center;
            background: #000;
            font-size: 0.1rem;
            display: inline-block;
            margin-left: 0.03rem;
          }
        }
      }
      .vip_a_box_text_4 {
        width: 100%;
        height: 0.2rem;
        margin-top: 0.13rem;
        span {
          line-height: 0.2rem;
          font-size: 0.14rem;
          color: #f0e0ae;
        }
        span:nth-of-type(1) {
          float: left;
          margin-left: 0.45rem;
        }
        span:nth-of-type(2) {
          float: right;
          margin-right: 0.45rem;
        }
      }
    }
  }
}
.vip_b {
  width: 100%;
  height: 0.95rem;
  background: #f5f5f5;
  box-sizing: border-box;
  padding: 0.25rem 0;
  text-align: center;
  button {
    width: 3.22rem;
    height: 0.45rem;
    border-radius: 0.22rem;
    border: none;
    color: #fefefe;
    font-size: 0.18rem;
    font-weight: bold;
    background: linear-gradient(90deg, rgb(254, 206, 157), rgb(215, 154, 98));
  }
}
.vip_c {
  width: 100%;
  height: 4.82rem;
  box-sizing: border-box;
  padding: 0.15rem;
  .vip_c_bj {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 0 0.2rem 0.25rem 0.2rem;
    background-image: url(https://m.juooo.com/static/img/plus_icon_1.35460df.png);
    background-size: 100% 100%;
    overflow: hidden;
    .vip_c_bj_box {
      width: 100%;
      height: 100%;
      h4 {
        width: 100%;
        height: 0.24rem;
        line-height: 0.24rem;
        margin-top: 0.28rem;
        margin-bottom: 0.04rem;
        text-align: center;
        color: #896039;
        font-size: 0.2rem;
      }
      .vip_c_bj_box_pic {
        width: 100%;
        height: 3rem;
        overflow: hidden;
        .bj_1 {
          width: 100%;
          height: 0.75rem;
          margin-top: 0.25rem;
          display: flex;
          justify-content: space-between;
          .bj_1_box {
            width: 0.6rem;
            height: 0.75rem;
            float: left;
            .bj_1_box_img {
              width: 0.47rem;
              height: 0.47rem;
              margin: 0 auto;
              background-image: url(https://m.juooo.com/static/img/vip_plus_right.61e731b.png);
              background-size: 2.2rem 1.66rem;
            }
            p {
              text-align: center;
              height: 0.2rem;
              line-height: 0.2rem;
              margin-top: 0.09rem;
              font-size: 0.12rem;
              color: #514843;
            }
          }
          .bj_1_box:nth-of-type(1) {
            .bj_1_box_img {
              background-position: -0.04rem -1.14rem;
            }
          }
          .bj_1_box:nth-of-type(2) {
            .bj_1_box_img {
              background-position: -1.13rem -1.14rem;
            }
          }
          .bj_1_box:nth-of-type(3) {
            .bj_1_box_img {
              background-position: -1.68rem -0.6rem;
            }
          }
          .bj_1_box:nth-of-type(4) {
            .bj_1_box_img {
              background-position: 0.5rem -0.04rem;
            }
          }
        }
        .bj_2 {
          width: 100%;
          height: 0.75rem;
          margin-top: 0.25rem;
          display: flex;
          justify-content: space-between;
          .bj_2_box {
            width: 0.6rem;
            height: 0.75rem;
            float: left;
            .bj_2_box_img {
              width: 0.47rem;
              height: 0.47rem;
              margin: 0 auto;
              background-image: url(https://m.juooo.com/static/img/vip_plus_right.61e731b.png);
              background-size: 2.2rem 1.66rem;
            }
            p {
              text-align: center;
              height: 0.2rem;
              line-height: 0.2rem;
              margin-top: 0.09rem;
              font-size: 0.12rem;
              color: #514843;
            }
          }
          .bj_2_box:nth-of-type(1) {
            .bj_2_box_img {
              background-position: 1.6rem -0.6rem;
            }
          }
          .bj_2_box:nth-of-type(2) {
            .bj_2_box_img {
              background-position: -1.13rem -0.6rem;
            }
          }
          .bj_2_box:nth-of-type(3) {
            .bj_2_box_img {
              background-position: -0.58rem -1.15rem;
            }
          }
          .bj_2_box:nth-of-type(4) {
            .bj_2_box_img {
              background-position: 2.16rem -0.59rem;
            }
          }
        }
        .bj_3 {
          width: 100%;
          height: 0.75rem;
          margin-top: 0.25rem;
          display: flex;
          justify-content: space-between;
          .bj_3_box {
            width: 0.6rem;
            height: 0.75rem;
            float: left;
            .bj_3_box_img {
              width: 0.47rem;
              height: 0.47rem;
              margin: 0 auto;
              background-image: url(https://m.juooo.com/static/img/vip_plus_right.61e731b.png);
              background-size: 2.2rem 1.66rem;
            }
            p {
              text-align: center;
              height: 0.2rem;
              line-height: 0.2rem;
              margin-top: 0.09rem;
              font-size: 0.12rem;
              color: #514843;
            }
          }
          .bj_3_box:nth-of-type(1) {
            .bj_3_box_img {
              background-position: -0.6rem -0.05rem;
            }
          }
          .bj_3_box:nth-of-type(2) {
            .bj_3_box_img {
              background-position: -1.14rem -0.05rem;
            }
          }
          .bj_3_box:nth-of-type(3) {
            .bj_3_box_img {
              background-position: -0.03rem -0.05rem;
            }
          }
        }
      }
      .vip_c_bj_box_button {
        width: 2.2rem;
        height: 0.4rem;
        margin: 0.3rem auto 0 auto;
        button {
          width: 100%;
          height: 0.4rem;
          border: none;
          border-radius: 0.2rem;
          background: #ffe8cf;
          text-align: center;
          line-height: 0.4rem;
          color: #6B4218;
          font-size: 0.16rem;
        }
      }
    }
  }
}
.vip_d {
  width: 100%;
  height: 1.8rem;
  box-sizing: border-box;
  padding: 0.3rem 0.33rem;
  background: #f5f5f5;
  margin-bottom: 0.5rem;
  img {
    width: 100%;
    height: 100%;
  }
}
.vip_footer {
  position: fixed;
  bottom: 0;
  z-index: 100;
  background: white;
  width: 100%;
  height: 0.5rem;
  span {
    float: left;
    width: 50%;
    text-align: center;
    height: 0.5rem;
    line-height: 0.5rem;
    b {
      color: #ff6743;
      font-size: 0.16rem;
    }
  }
  span:nth-of-type(1) {
    font-size: 0.12rem;
  }
  span:nth-of-type(2) {
    background: linear-gradient(90deg, rgb(254, 206, 157), rgb(215, 154, 98));
    font-weight: bold;
    color: white;
    font-size: 0.16rem;
  }
}
/deep/ .van-nav-bar {
  border-bottom: 1px solid #ebebeb;
}
/deep/ .van-icon-arrow-left {
  font-size: 0.2rem;
  color: #232323;
}
/deep/ .van-icon-ellipsis {
  font-size: 0.2rem;
  color: #232323;
}
</style>
